package cn.group7.padserver.service.impl;

import cn.group7.padserver.dao.PurchaseDetailDao;
import cn.group7.padserver.entity.PurchaseDetail;
import cn.group7.padserver.service.PurchaseDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 谷汉斌
 * @description
 * @createTime 2024/8/4 下午4:34
 */
@Service
public class PurchaseDetailsServiceImpl implements PurchaseDetailService {

    @Autowired
    private PurchaseDetailDao purchaseDetailDao;

    @Override
    public boolean add(PurchaseDetail purchaseDetail) {
        return purchaseDetailDao.insertSelective(purchaseDetail)==1;
    }

    @Override
    public List<PurchaseDetail> selectByPurchaseId(Integer purchaseId) {
        return purchaseDetailDao.selectByPurchaseId(purchaseId);
    }
}
